<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function f1() {
            var acount = document.getElementById("acount").value;
            var pwd = document.getElementById("pwd").value;
            alert('账号:' + acount + '密码:' + pwd);
        }

    </script>
</head>

<body>
    <form>
        <input type="text" id="acount"><br>
        <input type="password" id="pwd"><br>
        <input type="submit" onclick="f1()">
    </form>
</body>

</html>